{template 'common/header'}
{template 'common'}
<div class="main">
	<ul class="nav nav-tabs">
		<li><a href="{php echo $this->createWebUrl('brand');}">品牌列表</a></li>
		<li{if $op=='edit' && empty($id)} class="active"{/if}><a href="{php echo $this->createWebUrl('brand',array('op'=>'edit'));}">添加品牌</a></li>
		{if $op=='edit' && !empty($id)}<li class="active"><a href="{php echo $this->createWebUrl('brand',array('op'=>'edit','id'=>$id));}">编辑品牌</a></li>{/if}
	</ul>
	<form action="" class="form-horizontal form" method="post" onsubmit="return formcheck()">
		<input type="hidden" name="id" value="{$item['id']}">
		<div class="panel panel-default">
			<div class="panel-heading">
				品牌基本信息
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" id="displayorder" name="displayorder" class="form-control" value="{$item['displayorder']}">
						<span class='help-block'>数字越大排名越高</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">品牌名</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="title" id="title" value="{$item['title']}" class="form-control">
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
					<div class="col-sm-9 col-xs-12">
						<label class="radio-inline">
							<input type="radio" name="status" value="1" {if $item['status'] == 1}checked{/if}/>显示
						</label>
						<label class="radio-inline">
							<input type="radio" name="status" value="0" {if $item['status'] == 0}checked{/if}/>隐藏
						</label>
						<span class='help-block'>手机前台是否显示</span>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
			<input type="hidden" name="token" value="{$_W['token']}" />
		</div>
	</form>
	<script type="text/javascript">
		function formcheck() {
			if ($("#title").isEmpty()) {
				Tip.select("title", "请填写品牌!", "right");
				return false;
			}
			return true;
		}
	</script>

